<div ui-view>
  <div class="page-bar">
      <ul class="page-breadcrumb">
          <li>
              <a href="javascript:;">WMS</a>
              <i class="fa fa-circle"></i>
          </li>
          <li>
              <a href="javascript:;">Task</a>
              <i class="fa fa-circle"></i>
          </li>
          <li>
              <a href="#">Unassigned Task</a>
          </li>
      </ul>
  </div>
  <div class="portlet light bordered order-list-container" style="margin: 15px;">
      <div class="portlet-title">
          <div class="caption">
              <span class="caption-subject bold">Unassigned Task List</span>
          </div>

      </div>
      <div class="portlet-body form form-horizontal">
          <form>
              <div class="row form-group">
                  <div class="col-md-3">
                      <label>Task ID</label>
                      <lt-tags-input ng-model="search.taskIds" placeholder="Enter Task ID" fill="TASK-" ng-keyup="keyUpSearch($event)"></lt-tags-input>
                  </div>
              </div>

              <div class="form-actions right" >
                  <waitting-btn type="button" btn-class="btn blue" ng-click="searchTasks()"
                                value="'Search'" is-loading="loading"></waitting-btn>
              </div>

          </form>
          <div class="table-scrollable item-list-continer" style="overflow:initial">
              <table class="table table-striped table-bordered table-hover">
                  <thead>
                  <tr>
                      <th class="col-md-2">Task ID</th>
                      <th class="col-md-1">Task type</th>
                      <th class="col-md-1">status</th>
                      <th class="col-md-3">Task created time</th>
                      <th class="col-md-3">Assignee</th>
                      <th class="col-md-2">Stand by time</th>
                  </tr>
                  </thead>
                  <tbody>
                  <tr ng-repeat="task in tasks track by $index">
                      <td>{{ task.id }}</td>
                      <td>{{ task.taskType}}</td>
                      <td>{{ task.status }}</td>
                      <td>{{ task.createdWhen | amDateFormat:'YYYY-MM-DD HH:mm'}}</td>
                      <td><user-auto-complete name="assignee" allow-clear="true"
                            ng-model="task.assigneeUserId" limit="10" class="select-show"></user-auto-complete>
                      </td>
                      <td>{{ during(task.createdWhen)}}</td>
                      
                  </tr>
                  </tbody>
              </table>
          </div>
          <div class="form-actions right"  permission-check="{{'task::unassigned_write'}}" >
            <waitting-btn type="button" btn-class="btn blue" ng-click="Assign()"
                          value="'Assign'" is-loading="loading"></waitting-btn>
        </div>
          <pager total-count="paging.totalCount" current-page ="paging.pageNo" page-size="pageObj.pageSize" load-content="loadContent(currentPage)"></pager>
      </div>
  </div>
</div>